package com.mouse.hxsj.service;

import com.mouse.damo.micro.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
//间隔
@Component
@Slf4j
public class SendService {
    public static void main(String[] args) {
        Com com = new Com();
        com.setResourcePath("D:/damo");
        boolean bind = com.bind(462372);
        System.out.println(bind);
        for (int i = 500; i < Integer.MAX_VALUE; i++) {
            new SendService().send(com, "飞机坐标:1号君子80,56  2号莫愁89.25  3号巨人25,30  4号轩辕54,51  5号艺人23,33 6号群芳77,27  "+i);
            Sleep.sleep(120*1000);
        }

    }

    public void send(Com com, String send) {
        Press press = new Press(com);
        Window window = new Window(com);
        Mouse mouse = new Mouse(com);
        press.keyPress(Press.ENTER);
        Sleep.sleep(200);
        window.sendString(com.getHwnd(), send);
        Sleep.sleep(50);
        press.keyPress(Press.ENTER);
    }
}
